package main

import (
	"fmt"
)

//map 切片
func main() {
	var monster []map[string]string
	monster = make([]map[string]string, 2)
	if monster[0] == nil {
		monster[0] = make(map[string]string, 2)
		monster[0]["name"] = "牛魔王"
		monster[0]["age"] = "500"
	}
	if monster[1] == nil {
		monster[1] = make(map[string]string, 2)
		monster[1]["name"] = "玉兔精"
		monster[1]["age"] = "300"
	}
	monster = append(monster, map[string]string{"name": "狐狸精", "age": "800"})
	fmt.Println(monster)
}
